import time
from timeit import timeit

from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.wait import WebDriverWait

driver = webdriver.Chrome(executable_path='Chromedriver.exe')
driver.get("http://121.43.169.97:8848/pageA.html")

#暂停两秒
time.sleep(2)
#滚动条拉到最底层
js = "window.scrollTo(0,1000)"
#调用执行js语句方法
driver.execute_script(js)

time.sleep(2)
#滚动条拉到最上层
js2 = "window.scrollTo(0,0)"
driver.execute_script(js2)